package com.hhh.petadopt.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import com.hhh.petadopt.service.LogoutService;

/**
 * 退出登录
 * @author 杜镇声声
 *
 */
@Controller
public class LogoutController {
	@Autowired
	private LogoutService logoutService;
	
	@RequestMapping(value="/user/logout/{token}")
	public String lougout(@PathVariable String token) {
		logoutService.logout(token);
		return "redirect:/index/indexlist.html";
	}

}
